﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;

namespace NFine.Domain.Entity.SystemManage
{
    public class UserEntity : IEntity<UserEntity>, ICreationAudited, IDeleteAudited, IModificationAudited
    {
        public string F_Id { get; set; }
        public string F_Account { get; set; }
        public string F_RealName { get; set; }
        public string F_NickName { get; set; }
        public string F_HeadIcon { get; set; }
        public bool? F_Gender { get; set; }
        public DateTime? F_Birthday { get; set; }
        public string F_MobilePhone { get; set; }
        public string F_Email { get; set; }
        public string F_WeChat { get; set; }
        public string F_ManagerId { get; set; }
        public int? F_SecurityLevel { get; set; }
        public string F_Signature { get; set; }
        public string F_OrganizeId { get; set; }
        public string F_DepartmentId { get; set; }
        public string F_RoleId { get; set; }
        public string F_DutyId { get; set; }
        public bool? F_IsAdministrator { get; set; }
        public int? F_SortCode { get; set; }
        public bool? F_DeleteMark { get; set; }
        public bool? F_EnabledMark { get; set; }
        public string F_Description { get; set; }
        public DateTime? F_CreatorTime { get; set; }
        public string F_CreatorUserId { get; set; }
        public DateTime? F_LastModifyTime { get; set; }
        public string F_LastModifyUserId { get; set; }
        public DateTime? F_DeleteTime { get; set; }
        public string F_DeleteUserId { get; set; }

        public bool? F_Installed { get; set; }

        public string F_Pic { get; set; }

        public string F_FatherPath { get; set; }

        public string F_FatherId { get; set; }

        public string F_CardId { get; set; }

        public string F_AccountName { get; set; }

        public string F_BankAccount { get; set; }

        public string F_Bank { get; set; }

        public string F_BankAddre { get; set; }

        public string F_Address { get; set; }

        public decimal? F_MemberMoney { get; set; }

        public string ReferenceID { get; set; }

        public int? RCount { get; set; }
        public string CurrentGroupID { get; set; }

        /// <summary>
        /// 2,跳出第一轮经营组;3,黄金董事(两区都一轮);4,红宝石董事(任意一区黄金);5,翡翠董事(任意一区红宝石);6,钻石董事(任意一区红宝石);7,荣誉董事(两区都为钻石)
        /// </summary>
        public int? CurrentManagerType { get; set; }
        public string CurrentManager { get; set; }

        public int? CumulativePoints { get; set; }
        /// <summary>
        /// 0,不是代理;1,省代理;2,市代理;3,区县代理
        /// </summary>
        public int ProxyType { get; set; }

        public string ProxyCode { get; set; }

        /// <summary>
        /// 0,无福利金;1,车奖励;2,房奖励
        /// </summary>
        public int WelfarePrize { get; set; }

        public string F_Province { get; set; }
        public string F_City { get; set; }
        public string F_Area { get; set; }
        public string F_IdAddress { get; set; }
        public bool? IsRepeat { get; set; }

        [NotMapped]
        public string ReferenceAccount { get; set; }
        [NotMapped]
        public string ReferenceName { get; set; }
        [NotMapped]
        public decimal D_Amount { get; set; }
        [NotMapped]
        public decimal D_RepeatAmount { get; set; }
        [NotMapped]
        public decimal D_HatchAmount { get; set; }
        [NotMapped]
        public decimal D_GiveAmount { get; set; }

        [NotMapped]
        public List<UserEntity> childrens { get; set; }


    }

    public enum ManagerType : int
    {
        跳出第一轮经营组 = 2,
        黄金董事 = 3,
        红宝石董事 = 4,
        翡翠董事 = 5,
        钻石董事 = 6,
        荣誉董事 = 7
    }

    public class Trigger
    {
        public string UserID;
        public DateTime Time;
    }
}
